package model

import (
	"cabinet/pkg/global"
	"gorm.io/gorm"
	"time"
)

// 故障表
type FaultReport struct {
	gorm.Model
	FaultID     int `gorm:"not null" json:"fault_id"`
	CabinetID   int `gorm:"not null" json:"cabinet_id"`
	LockerID    int `gorm:"not null" json:"locker_id"`
	ReportTime  time.Time
	Descripiton string `gorm:"type:varchar(255)" json:"descripiton"`
	Status      int    `gorm:"type:smallint(1) ; not null" json:"status0"`
	Handler     string `gorm:"type:varchar(255)" json:"handler"`
	BaseModel
}

func GetFaultReportTable() *gorm.DB {
	return global.Mysql.Model(&FaultReport{})
}
